package com.xiaofeng.pochi.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaofeng.pochi.common.Page;
import com.xiaofeng.pochi.pojo.SysUser;
import com.xiaofeng.pochi.pojo.vo.SysUserVo;

import java.lang.reflect.InvocationTargetException;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/07/22/22:36
 * @Description:
 */
public interface SysUserService extends IService<SysUser> {

    /**
     * 更新指定用户名的登录时间
     *
     * @param username
     */
    void updateLoginTime(String username);

    /**
     * 根据用户名查询用户
     *
     * @param username
     * @return
     */
    SysUser getByUsername(String username);


//    /**
//     * 保存用户
//     * @param sysUser
//     */
//    void saveUser(SysUserVo sysUser);

    void updateUser(SysUserVo sysUser) throws InvocationTargetException, IllegalAccessException;

    /**
     * 启用
     * @param id
     */
    void enable(Long id);

    /**
     * 禁用
     * @param id
     */
    void disable(Long id);


    /**
     * 分页查询
     * @param page
     * @return
     */
    Page<SysUser> getByPage(Page<SysUser> page);

}
